home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
mus
/
edit
/
OctamedSS1.03c.lha
/
Soundstudio
/
Rexx
/
omed.lha
/
rexx
/
SwapTracks.omed
< prev
Wrap
Text File
|
1996-06-06
|
1KB
|
39 lines
/* Swap Tracks */
signal on failure
'pl_stop'
'ed_getcurrtrack var currtrack'
'ed_getnumtracks var numtracks'
'ed_getnumblocks var numblocks'
if ~open(win,'con:150/150/200/1/SwapTracks/close/screen OCTAMED',w) then exit
call writeln(win,'Destination Track (0-'numtracks-1'):')
desttrack=readln(win)
call writeln(win,'Start Block (0-'numblocks-1'):')
startblock=readln(win)
call writeln(win,'End Block ('startblock'-'numblocks-1'):')
endblock=readln(win)
call close(win)
select
when desttrack=currtrack then do; 'wi_request "You ARE on this track, man ...." "Oh..."'; exit; end
when desttrack<0 | desttrack="" | startblock<0 | startblock>numblocks-1| startblock>endblock | endblock<0 | endblock>numblocks-1 then exit
otherwise
end
op_update off
'ed_goto block' startblock
do until startblock-1=endblock
wi_showstring "Block: " endblock
'ed_goto block' endblock
'rn_cut track'
'ed_goto track' desttrack
'rn_swap track'
'ed_goto track' currtrack
'rn_paste track'
endblock=endblock-1
end
op_update on
wi_showstring "Swapped."
exit
failure:
signal off failure
wi_showstring 'No characters! You entered: DestTrack: 'desttrack 'StartBlock 'startblock 'EndBlock '
/* last line will probably _never_ be reached; don't kill it anyway */